<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			*{
				padding: 0%;
				margin: 0%;
			}
			#aside{
				position: absolute;
				top: 200px;
				left: 0;
				width: 300px;
			}
			#aside img{
				width: 100%;
			}
		</style>
	</head>
	<body style="height: 5000px;">
		<div id="aside">
			<img src="images/aside.png" alt="" />
		</div>
		<script src="js/myAnimation2.js"></script>
		<script>
			//1.获取标签
			let aside = document.getElementById('aside');
			//2.计算偏移量
			let aside_top = aside.offsetTop;
			window.onscroll = function() {
				//3.获取页面滚动的高度
				let docScrollTop = document.documentElement.scrollTop || document.body.scrollTop;
				startAnimation(aside,{"top": aside_top + docScrollTop});
			}
		</script>
	</body>
</html>